package shijian;

import java.util.ArrayList;
import java.util.List;

public class RecipeManagerImpl {
    private List<Recipe> recipes;

    public RecipeManagerImpl() {
        recipes = new ArrayList<>();
    }

    public void addRecipe(Recipe recipe) {
        recipes.add(recipe);
    }

    public void removeRecipe(String name) {
        recipes.removeIf(recipe -> recipe.getName().equals(name));
    }

    public List<Recipe> getAllRecipes() {
        return recipes;
    }
}
